package com.moi.Proxy;

public class NetUser extends Net {
    private String name;
    private Net netProxy=null;
    public NetUser(String name){
        this.name=name;
    }

    public void setNetProxy(Net netProxy) {
        this.netProxy = new NetProxy();
    }

    @Override
    public void accessNet() {
        System.out.println(this.name+" 正在上网");
        if(null==netProxy){
            System.out.println(this.name+" 您没有权限访问外网..");
        }
        netProxy.accessNet();

    }
}
